package com.kgc.service.Impl;

import com.kgc.dao.mapper.StatisticsMapper;
import com.kgc.service.interf.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StatisticsServiceImpl implements StatisticsService {
    @Autowired
    private StatisticsMapper statisticsMapper;

    /**
     * 获取用户总数
     * @return
     */
    @Override
    public int getUserCount() {
        return statisticsMapper.getUserCount();
    }

    /**
     * 获取文章总数
     * @return
     */
    @Override
    public int getArticleCount() {
        return statisticsMapper.getArticleCount();
    }

    /**
     * 获取未结束活动总数
     * @return
     */
    @Override
    public int getActivityCountForNoEnd() {
        return statisticsMapper.getActivityCountForNoEnd();
    }

    /**
     * 获取已结束活动总数
     * @return
     */
    @Override
    public int getActivityCountForEnd() {
        return statisticsMapper.getActivityCountForEnd();
    }
}
